// import allRoutes from "./allRoutes"

const dynamicRoutes = [
    {
        path: "/",
        name: "home",
        component: () => import("@/pages/Home"),
        redirect:"/welcome",
        children:[
            {
                path: "vipmanager",
                component: () => import(/*webpackChunkName:"vipmanager" */ "../pages/Home/VipManager"),
                name: "vipmanager",
                redirect: "/vipmanager/charge",
                meta: {
                  //储存一些属性
                  icon: "iconfont icon-VIPguanli",
                  name: "vip管理",
                  fullPath:"/vipmanager"
                },
                children:[
                  {
                    path: "charge",
                    component: () => import(/*webpackChunkName:"charge" */ "../pages/Home/VipManager/Charge"),
                    name: "charge",
                    meta: {
                      //储存一些属性
                      icon: "iconfont icon-VIPchongzhi-",
                      name: "vip充值",
                      fullPath:"/vipmanager/charge"
                    }
                  },  
                  {
                    path: "order",
                    component: () => import(/*webpackChunkName:"order" */ "../pages/Home/VipManager/Order"),
                    name: "order",
                    meta: {
                      //储存一些属性
                      icon: "iconfont icon-dingdanguanli",
                      name: "订单管理",
                      fullPath:"/vipmanager/Order"
                    }
                  },  
                ]
              },
              {
                path: "preorder",
                component: () => import(/*webpackChunkName:"preorder" */ "../pages/Home/PreOrder"),
                name: "preorder",
                meta: {
                  //储存一些属性
                  icon: "iconfont icon-dingdanguanli",
                  name: "预支付页面",
                  fullPath:"/preorder"
                }
              },
              {
                path: "payment",
                component: () => import(/*webpackChunkName:"payment" */ "../pages/Home/PayMent"),
                name: "payment",
                meta: {
                  name: "支付页面",
                  fullPath:"/payment"
                },
                children:[
                  {
                    path:"pay",
                    component:()=>import(/*webpackChunkName:"payment" */ "../pages/Home/PayMent/Pay"),
                    name:"pay",
                    meta:{
                      name:"正在支付",
                      fullPath:"/payment/pay"
                    }
                  },
                  {
                    path:"paysuccess",
                    component:()=>import(/*webpackChunkName:"paysuccess" */ "../pages/Home/PayMent/PaySuccess"),
                    name:"paysuccess",
                    meta:{
                      name:"支付成功",
                      fullPath:"/payment/paysuccess"
                    }
                  },
                  {
                    path:"payfail",
                    component:()=>import(/*webpackChunkName:"payfail" */ "../pages/Home/PayMent/PayFail"),
                    name:"payfail",
                    meta:{
                      name:"支付失败",
                      fullPath:"/payment/payfail"
                    }
                  },
                ]
              },
        ]
    },
    {
        path: "*",
        name: "page404",
        component: () => import("@/pages/Page404")
    }
]

export default dynamicRoutes